|
오라클 실습 |
[1] |
|
등록일:2009-05-28 00:12:24 (0%) 작성자: 제목:사례4. or와 같이 사용하는 outer조인 |
|
select a.col1, a.col2, b.col3, b.col4
from tab1 a, tab2
where a.pk =b.pk1(+)
and a.pk2 = b.pk(2)
and (a,col5 = ‘aaaa’ or a.col5 = ‘bbbb’ or
a.col5 = ‘cccc’ or a.col5 = ‘dddd’);
 or는 full scan으로 풀리기 때문에 위와 같은 경우 union all로 4개를 쓰면 된다. 그러나 oracle7.2이상에서는 --+use_concat 라는 힌트를 줌으로써 or를 사용해도 full-scan을 하지않아도 된다. |
[본문링크] 사례4. or와 같이 사용하는 outer조인
|
[1]
|
|
|
|
|
코멘트(이글의 트랙백 주소:/cafe/tb_receive.php?no=31496 |
|
|
|
|
|
|
|
|
|
Copyright byCopyright ⓒ2005, SSISO Community All Rights Reserved.
|
|
|